//
//  HeadMovieCollectionViewCell.m
//  MyMovie
//
//  Created by apple on 16/5/18.
//  Copyright © 2016年 ljp. All rights reserved.
//

#import "HeadMovieCollectionViewCell.h"

@interface HeadMovieCollectionViewCell ()
{
    UIImageView *imageView;
}

@end

@implementation HeadMovieCollectionViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (instancetype)initWithFrame:(CGRect)frame {

    self = [super initWithFrame:frame];
    if (self) {
        [self createSubviews];
    }
    return self;

}

- (void)createSubviews {

    imageView = [[UIImageView alloc] initWithFrame:self.bounds];
    [self.contentView addSubview:imageView];
}

- (void)setMovie:(Movie *)movie {

    NSURL *url = [NSURL URLWithString:movie.images[@"small"]];
    [imageView sd_setImageWithURL:url];
}

@end
